package com.example.streamtransport.Handler;

import com.example.streamtransport.Model.BussinessRequest;
import com.example.streamtransport.Model.BussinessResponse;
import com.example.streamtransport.Model.EmptyRequest;
import com.mediator.Annotations.CommandHandler;
import com.mediator.Handler.ICommandHandler;
import com.mediator.Mediator.IMediator;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;
@CommandHandler
public class BussinessHandler implements ICommandHandler<BussinessRequest, BussinessResponse> {
    @Autowired
    private IMediator mediator;
    @Override
    public BussinessResponse Handle(BussinessRequest request) {
        mediator.Send(new EmptyRequest());
        return new BussinessResponse();
    }
}
